<?php
namespace Admin\Controller;
use Think\Controller;
use Common\BaseController;
use Common\Common\Log;
class CityController extends BaseController {
    public function distribution(){
        $templData['title']='分配城市';
        $res=M("region")->select();
        $country=array();
        $province=array();
        foreach($res as $k=>$v){
            if($v['parent_id']==0){
               $country[]=$v;
            }
            if($v['parent_id']==1){
               $province[]=$v;
            }
        }
        $templData['country']=$country;
        $templData['province']=$country;
        $this->assign($templData);
        $this->display();
    }
}